Owner deletion added
[RRRRHHHH_Code] / ruralHouses client / src / gui / AdminMenuGUI.java
1 package gui;
2
3 import java.awt.Frame;
4 import java.awt.event.ActionEvent;
5 import java.awt.event.ActionListener;
6
7 import javax.swing.GroupLayout;
8 import javax.swing.GroupLayout.Alignment;
9 import javax.swing.JButton;
10 import javax.swing.JFrame;
11 import javax.swing.JPanel;
12 import javax.swing.border.EmptyBorder;
13 import javax.swing.LayoutStyle.ComponentPlacement;
14
15 public class AdminMenuGUI extends JFrame {
16
17         /**
18          * 
19          */
20         private static final long serialVersionUID = 1L;
21         private JPanel contentPane;
22
23
24         
25         /**
26          * Create the frame.
27          */
28         public AdminMenuGUI() {
29                 
30                 
31                 this.setTitle("Administrator Menu");
32                 this.getContentPane().setLayout(null);
33                 setBounds(100, 100, 450, 500);
34                 contentPane = new JPanel();
35                 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
36                 setContentPane(contentPane);
37                 //TODO BOTH BUTTONS ARE TO MODIFY
38                 JButton btnAdd = new JButton("Add requests");
39                 btnAdd.setBounds(120, 67, 164, 81);
40                 btnAdd.addActionListener(new ActionListener() {
41                         public void actionPerformed(ActionEvent e) {
42                                 Frame a = new listOfAdditionRequestsGUI();
43                                 a.setVisible(true);
44                         }
45                 });
46                 
47                 JButton btnDel = new JButton("Delete Requests");
48                 btnDel.setBounds(120, 159, 164, 73);
49                 btnDel.addActionListener(new ActionListener() {
50                         public void actionPerformed(ActionEvent e) {
51                                 Frame a = new listOfRemovalRequestsGUI();
52                                 a.setVisible(true);
53                         }
54                 });
55                 
56                 JButton btnOwneraddition = new JButton("OwnerAddition");
57                 btnOwneraddition.setBounds(120, 243, 164, 73);
58                 btnOwneraddition.addActionListener(new ActionListener() {
59                         public void actionPerformed(ActionEvent e) {
60                                 Frame a = new listOfOwnerAddittionRequests();
61                                 a.setVisible(true);
62                         }
63                 });
64                 contentPane.setLayout(null);
65                 contentPane.add(btnOwneraddition);
66                 contentPane.add(btnDel);
67                 contentPane.add(btnAdd);
68         
69                 JButton btnOwnerDeletion = new JButton("Owner Deletion");
70                 btnOwnerDeletion.setBounds(120, 331, 164, 73);
71                 btnOwnerDeletion.addActionListener(new ActionListener() {
72                         public void actionPerformed(ActionEvent e) {
73                                 Frame a = new DeleteOwnerGUI();
74                                 a.setVisible(true);
75                         }
76                 });
77                 contentPane.add(btnOwnerDeletion);
78         }
79 }